/**
 * 格式化富文本
 */
export const formatRichText = (contents) => {
	try {
		return contents.replace(/(style="(.*?)")|(width="(.*?)")|(height="(.*?)")/ig, '')
			.replace(/\<img/gi,
				'<img style="display:block;max-width:90%;height:auto;border:2px solid #eee;box-shadow:5px 5px 5px rgba(100,100,100,0.8);margin-bottom:10px;text-align:center;" '
			);
	} catch {
		return contents;
	}
}